﻿using System;
using System.Collections.Generic;

namespace eStock.DataObjects
{
    public class Project
    {
        public int Id { get; set; }
        public int ImgId { get; set; }
        public DBImage Image { get { return DatabaseObjects.Images != null ? DatabaseObjects.Images.GetById(ImgId) : null; } }
        public string Title { get; set; }
        public string Description { get; set; }

        /// <summary>
        /// Key = ComponentId
        /// Value = Amount
        /// </summary>
        public Dictionary<int, int> Components { get; private set; }
        public DateTime Created { get; set; }

        public Project()
        {
            Components = new Dictionary<int, int>();
        }
    }
}
